<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Content extends MX_Controller {


	function __construct(){

		$this->load->model('content/content_model');
		$this->load->model('currency/currency_model');
		$this->load->library('currency/currency');
		$this->load->library('auth/tank_auth');
		$this->lang->load('auth/tank_auth');
		$this->load->model('tank_auth/users');
		$this->load->helper(array('form', 'url'));
		$this->load->library('form_validation');
	}

	
	function header_content(){
		$data['currency'] = $this->currency_model->getCurrency();
		$currency_id = $this->session->userdata('sess_currency');
		$set = $this->currency->setCurrency($currency_id);
		
		//$data = array(); 
		return $this->load->view('content/header_content', $data);

	}
	
	function set_currency($currency_id = ''){
		$this->currency->setCurrency($currency_id);
		redirect('');
	}


	function footer_content(){

		$data = array();

		return $this->load->view('content/footer_content',$data, TRUE);

	}


	function sidebar_content(){

		$data['category'] = $this->content_model->get_category();

		return $this->load->view('content/sidebar_content',$data, TRUE);

	}


	function slideshow_content(){

		$data['slide'] = $this->content_model->get_slide();

		return $this->load->view('content/slideshow_content',$data, TRUE);

	}


	function feature_product_content(){

		$data['featured_product'] = $this->content_model->get_featured_product();

		return $this->load->view('content/feature_product_content',$data, TRUE);
	}


	function other_product_content(){

		$data['other_random_product'] = $this->content_model->get_random_product(6);

		return $this->load->view('content/other_product_content',$data, TRUE);
	}
	
	
}

/* End of file common.php */